require-movemail-use-liblockfile.diff
authorRob Browning <rlb@defaultvalue.org>
Tue, 5 Apr 2011 03:46:26 +0000 (22:46 -0500)
committerRob Browning <rlb@defaultvalue.org>
Tue, 5 Apr 2011 03:46:26 +0000 (22:46 -0500)
* The build will fail if liblockfile isn't selected for movemail.
  Patch: require-movemail-use-liblockfile.diff
  Author: Rob Browning <rlb@defaultvalue.org>
Added-by: Rob Browning <rlb@defaultvalue.org>
  This makes sure the Debian Emacs won't accidentally be built with
  the wrong locking strategy.  To disable this check, comment out
  require-movemail-use-liblockfile.diff in debian/patches/series.

lib-src/movemail.c
src/s/bsd-common.h

index ae51df3d39c967fe43ff1f2fb9b97d579b8b7e4f..7c8cfff21d594738b522cdde151d3656af37cc2a 100644 (file)
@@ -166,6 +166,10 @@ int mbx_delimit_end ();
 /* Nonzero means this is name of a lock file to delete on fatal error.  */
 char *delete_lockname;
 
+#ifndef MAIL_USE_MAILLOCK
+#error "Debian requires that mail locking be handled by liblockfile."
+#endif /* ndef MAIL_USE_MAILLOCK */
+
 int
 main (argc, argv)
      int argc;
index 8094f50d3173e88a61f8ffe91e840a1087720993..fd0eb1ae786c45fda194e5448203b2808897cf5e 100644 (file)
@@ -66,7 +66,11 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    The alternative is that a lock file named
    /usr/spool/mail/$USER.lock.  */
 
+/* conditional copied from gnu-linux.h */
+#if !((defined (HAVE_LIBMAIL) || defined (HAVE_LIBLOCKFILE)) && \
+      defined (HAVE_MAILLOCK_H))
 #define MAIL_USE_FLOCK
+#endif
 
 /* Define CLASH_DETECTION if you want lock files to be written
    so that Emacs can tell instantly when you try to modify